#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
@File        :   1.两数之和.py    
@Contact     :   lhouctcs@163.com
@License     :   MIT
@Time        :   2023/2/6 14:33
@Author      :   lhou 
@Version     :   0.1.0
@Description :
"""
from typing import List


# import lib
class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        d = dict()
        for i in range(len(nums)):
            if nums[i] not in d:
                d[target - nums[i]] = i
            else:
                return [i, d[nums[i]]]
